﻿<!doctype html>
<html>
<head>
    <title>绝对定位</title>
    <style type="text/css">
        body{
             margin: 20px;
             font:Arial 12px;
          }
        #father {
             background-color: #a0c8ff;
	     border:1px dashed #000000;
	     padding: 15px;
          }
        #block-one {
            background-color:#fff0ac;
            border:1px dashed #000000;
	    padding: 10px;
	    position:relative;
          }
	#block-two {
            background-color:#fff0ac;
            border:1px dashed #000000;
	    padding: 10px;
	    position:fixed;
	    top:0; 
	    right:0;
          }
	#block-three {
            background-color:#fff0ac;
            border:1px dashed #000000;
	    padding: 10px;
	    position:relative;
          }
    </style>
</head>
<body>
   <div id="father">
	<div id="block-one">盒子1</div>
	<div id="block-two">盒子2</div>
	<div id="block-three">盒子3</div>
   </div>
</body>
</html>
